package com.ymttest.database.mapping.withdraw;

import com.ymttest.database.model.withdraw.Ymt_AbroadFundAccount;
import com.ymttest.database.model.withdraw.Ymt_AbroadFundAccountExample;
import com.ymttest.database.model.withdraw.Ymt_FundAccount;
import com.ymttest.database.model.withdraw.Ymt_FundAccountExample;
import com.ymttest.database.model.withdraw.Ymt_InvoiceApprovment;
import com.ymttest.database.model.withdraw.Ymt_InvoiceApprovmentExample;
import com.ymttest.database.model.withdraw.Ymt_InvoiceFundFlowLog;
import com.ymttest.database.model.withdraw.Ymt_InvoiceFundFlowLogExample;
import com.ymttest.database.model.withdraw.Ymt_InvoiceOperationLog;
import com.ymttest.database.model.withdraw.Ymt_InvoiceOperationLogExample;
import com.ymttest.database.model.withdraw.Ymt_InvoiceOperationLogWithBLOBs;
import com.ymttest.database.model.withdraw.Ymt_InvoiceSerialSeed;
import com.ymttest.database.model.withdraw.Ymt_InvoiceSerialSeedExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawCounter;
import com.ymttest.database.model.withdraw.Ymt_WithDrawCounterExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawIdempotent;
import com.ymttest.database.model.withdraw.Ymt_WithDrawIdempotentExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoice;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceEx;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceExExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceXloboLog;
import com.ymttest.database.model.withdraw.Ymt_WithDrawInvoiceXloboLogExample;
import com.ymttest.database.model.withdraw.Ymt_WithDrawXloboMapping;
import com.ymttest.database.model.withdraw.Ymt_WithDrawXloboMappingExample;
import com.ymttest.database.model.withdraw.Ymt_fundRateExpression;
import com.ymttest.database.model.withdraw.Ymt_fundRateExpressionExample;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface YmtWithdrawMapper {
	@SelectProvider(type=Ymt_InvoiceFundFlowLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="FundFlowLogId", property="fundFlowLogId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="Amount", property="amount", jdbcType=JdbcType.DECIMAL),
        @Result(column="AccountType", property="accountType", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="OperatorId", property="operatorId", jdbcType=JdbcType.INTEGER),
        @Result(column="OperatorName", property="operatorName", jdbcType=JdbcType.NVARCHAR),
        @Result(column="InvoiceId", property="invoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="ResultCode", property="resultCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="ResultMsg", property="resultMsg", jdbcType=JdbcType.NVARCHAR)
    })
    List<Ymt_InvoiceFundFlowLog> selectYmtInvoiceFundFlowLog(Ymt_InvoiceFundFlowLogExample example);
    
    @SelectProvider(type=Ymt_InvoiceOperationLogSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="OperationLogId", property="operationLogId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="InvoiceId", property="invoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="OperatorId", property="operatorId", jdbcType=JdbcType.INTEGER),
        @Result(column="Operator", property="operator", jdbcType=JdbcType.NVARCHAR),
        @Result(column="InvoiceType", property="invoiceType", jdbcType=JdbcType.INTEGER),
        @Result(column="OperationType", property="operationType", jdbcType=JdbcType.INTEGER),
        //新增
        @Result(column="OperationJsonEx", property="operationJsonEx", jdbcType=JdbcType.VARCHAR),
        @Result(column="OperationJson", property="operationJson", jdbcType=JdbcType.VARCHAR),
        
        @Result(column="OperationTime", property="operationTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_InvoiceOperationLog> selectYmtInvoiceOperationLog(Ymt_InvoiceOperationLogExample example);
    
    @SelectProvider(type=Ymt_InvoiceSerialSeedSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SerialNumber", property="serialNumber", jdbcType=JdbcType.BIGINT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_InvoiceSerialSeed> selectYmtInvoiceSerialSeed(Ymt_InvoiceSerialSeedExample example);
    
    @SelectProvider(type=Ymt_WithDrawInvoiceSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="WithDrawInvoiceId", property="withDrawInvoiceId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="UserAccountType", property="userAccountType", jdbcType=JdbcType.INTEGER),
        @Result(column="WriteOffTime", property="writeOffTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="WriteOffStatus", property="writeOffStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="WithDrawAmount", property="withDrawAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="InvoiceStatus", property="invoiceStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="UserLoginId", property="userLoginId", jdbcType=JdbcType.NVARCHAR),
        @Result(column="WithDrawType", property="withDrawType", jdbcType=JdbcType.INTEGER),
        @Result(column="WithDrawTime", property="withDrawTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ReceivableAccountType", property="receivableAccountType", jdbcType=JdbcType.INTEGER),
        @Result(column="ThirdPartyPlatformAccount", property="thirdPartyPlatformAccount", jdbcType=JdbcType.VARCHAR),
        @Result(column="PoundageAmount", property="poundageAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ApplyUserLoginId", property="applyUserLoginId", jdbcType=JdbcType.NVARCHAR),
        @Result(column="ApplyUserId", property="applyUserId", jdbcType=JdbcType.INTEGER),
        @Result(column="ApplyTime", property="applyTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CurrencyType", property="currencyType", jdbcType=JdbcType.INTEGER),
        @Result(column="BankAccountName", property="bankAccountName", jdbcType=JdbcType.NVARCHAR),
        @Result(column="BankName", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="SwiftCode", property="swiftCode", jdbcType=JdbcType.NVARCHAR),
        @Result(column="BankHostCity", property="bankHostCity", jdbcType=JdbcType.NVARCHAR),
        @Result(column="BankAccountNo", property="bankAccountNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="ApproveStatus", property="approveStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="ApproveTime", property="approveTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.NVARCHAR),
        @Result(column="WithDrawChannel", property="withDrawChannel", jdbcType=JdbcType.INTEGER),
        @Result(column="WithDrawBusinessScene", property="withDrawBusinessScene", jdbcType=JdbcType.INTEGER),
        @Result(column="LoginEmail", property="loginEmail", jdbcType=JdbcType.VARCHAR),
        @Result(column="RoutingNumber", property="routingNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="IBanCode", property="IBanCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="BranchAddress", property="branchAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="ReceiverAddress", property="receiverAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="BankCountry", property="bankCountry", jdbcType=JdbcType.VARCHAR),
        @Result(column="BankState", property="bankState", jdbcType=JdbcType.VARCHAR),
        @Result(column="BankCity", property="bankCity", jdbcType=JdbcType.VARCHAR),
        @Result(column="FundAccountId", property="fundAccountId", jdbcType=JdbcType.VARCHAR),
        @Result(column="BusinessName", property="businessName", jdbcType=JdbcType.NVARCHAR),
        @Result(column="AccountType", property="accountType", jdbcType=JdbcType.INTEGER),
        @Result(column="WeshopFlag", property="weshopFlag", jdbcType=JdbcType.INTEGER)
    })
    List<Ymt_WithDrawInvoice> selectYmtWithDrawInvoice(Ymt_WithDrawInvoiceExample example);
    
    @SelectProvider(type=Ymt_WithDrawIdempotentSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="IdempotentNo", property="idempotentNo", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="WithDrawInvoiceId", property="withDrawInvoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_WithDrawIdempotent> selectYmtWithDrawIdempotent(Ymt_WithDrawIdempotentExample example);
    
    @SelectProvider(type=Ymt_WithDrawInvoiceXloboLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="WithDrawInvoiceId", property="withDrawInvoiceId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="Request", property="request", jdbcType=JdbcType.VARCHAR),
        @Result(column="Response", property="response", jdbcType=JdbcType.VARCHAR),
        @Result(column="IsSuccess", property="isSuccess", jdbcType=JdbcType.BIT),
        @Result(column="RetryNum", property="retryNum", jdbcType=JdbcType.INTEGER),
        @Result(column="Memo", property="memo", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_WithDrawInvoiceXloboLog> selectYmtWithDrawInvoiceXloboLog(Ymt_WithDrawInvoiceXloboLogExample example);
    @SelectProvider(type=Ymt_WithDrawXloboMappingSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="XloboAccount", property="xloboAccount", jdbcType=JdbcType.VARCHAR),
        @Result(column="OpenId", property="openId", jdbcType=JdbcType.VARCHAR),
        @Result(column="IsDeleted", property="isDeleted", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_WithDrawXloboMapping> selectYmtWithDrawXloboMapping(Ymt_WithDrawXloboMappingExample example);
    
    @SelectProvider(type=Ymt_AbroadFundAccountSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="sAccountId", property="sAccountId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sAccountName", property="sAccountName", jdbcType=JdbcType.VARCHAR),
        @Result(column="iAccountType", property="iAccountType", jdbcType=JdbcType.INTEGER),
        @Result(column="sBankName", property="sBankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="sRoutingNum", property="sRoutingNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="sBankAccNum", property="sBankAccNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="sBranchAddress", property="sBranchAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="sCountry", property="sCountry", jdbcType=JdbcType.VARCHAR),
        @Result(column="sCurrency", property="sCurrency", jdbcType=JdbcType.VARCHAR),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="iUserId", property="iUserId", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="sExplain", property="sExplain", jdbcType=JdbcType.NVARCHAR),
        @Result(column="iOwnerType", property="iOwnerType", jdbcType=JdbcType.INTEGER),
        @Result(column="iCurrencyType", property="iCurrencyType", jdbcType=JdbcType.INTEGER),
        @Result(column="sBankCountry", property="sBankCountry", jdbcType=JdbcType.VARCHAR),
        @Result(column="sBankState", property="sBankState", jdbcType=JdbcType.VARCHAR),
        @Result(column="sBankCity", property="sBankCity", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSwiftCode", property="sSwiftCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="sIBanCode", property="sIBanCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="sReceiverAddress", property="sReceiverAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="sRemark", property="sRemark", jdbcType=JdbcType.VARCHAR),
        @Result(column="FundAccountInvoiceId", property="fundAccountInvoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="sLoginId", property="sLoginId", jdbcType=JdbcType.VARCHAR),
        @Result(column="sLoginEmail", property="sLoginEmail", jdbcType=JdbcType.VARCHAR)
    })
    List<Ymt_AbroadFundAccount> selectYmtAbroadFundAccount(Ymt_AbroadFundAccountExample example);
    
    @SelectProvider(type=Ymt_FundAccountSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="sAccountId", property="sAccountId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sAccountNo", property="sAccountNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="sAccountName", property="sAccountName", jdbcType=JdbcType.NCHAR),
        @Result(column="sInstitutionId", property="sInstitutionId", jdbcType=JdbcType.VARCHAR),
        @Result(column="sInstitutionName", property="sInstitutionName", jdbcType=JdbcType.VARCHAR),
        @Result(column="sInstitutionCity", property="sInstitutionCity", jdbcType=JdbcType.VARCHAR),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iUserId", property="iUserId", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="sExplain", property="sExplain", jdbcType=JdbcType.NVARCHAR),
        @Result(column="FundAccountInvoiceId", property="fundAccountInvoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="iAccountType", property="iAccountType", jdbcType=JdbcType.INTEGER),
        @Result(column="sLoginId", property="sLoginId", jdbcType=JdbcType.VARCHAR),
        @Result(column="sLoginEmail", property="sLoginEmail", jdbcType=JdbcType.VARCHAR),
        @Result(column="WeshopFlag", property="weshopFlag", jdbcType=JdbcType.INTEGER)
    })
    List<Ymt_FundAccount> selectYmtFundAccount(Ymt_FundAccountExample example);
    
    @SelectProvider(type=Ymt_fundRateExpressionSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="RateId", property="rateId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="Expression", property="expression", jdbcType=JdbcType.VARCHAR),
        @Result(column="ExpressionDes", property="expressionDes", jdbcType=JdbcType.VARCHAR),
        @Result(column="AddTime", property="addTime", jdbcType=JdbcType.DATE),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.DATE),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="UseWayId", property="useWayId", jdbcType=JdbcType.INTEGER),
        @Result(column="UseWayDes", property="useWayDes", jdbcType=JdbcType.VARCHAR),
        @Result(column="StrategyId", property="strategyId", jdbcType=JdbcType.INTEGER),
        @Result(column="StrategyDes", property="strategyDes", jdbcType=JdbcType.VARCHAR),
        @Result(column="GroupId", property="groupId", jdbcType=JdbcType.INTEGER),
        @Result(column="GroupName", property="groupName", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="UserLoginId", property="userLoginId", jdbcType=JdbcType.VARCHAR)
    })
    List<Ymt_fundRateExpression> selectYmtFundRateExpression(Ymt_fundRateExpressionExample example);
    
    @SelectProvider(type=Ymt_WithDrawInvoiceExSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="WithDrawInvoiceId", property="withDrawInvoiceId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="BatchCode", property="batchCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="InputResult", property="inputResult", jdbcType=JdbcType.BIT),
        @Result(column="InputResultInfo", property="inputResultInfo", jdbcType=JdbcType.NVARCHAR),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="OperatorId", property="operatorId", jdbcType=JdbcType.INTEGER),
        @Result(column="PayPlatformName", property="payPlatformName", jdbcType=JdbcType.VARCHAR),
        @Result(column="PayPlatformTradeNo", property="payPlatformTradeNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="OperatorLoginId", property="operatorLoginId", jdbcType=JdbcType.VARCHAR)
    })
    List<Ymt_WithDrawInvoiceEx> selectYmtWithDrawInvoiceEx(Ymt_WithDrawInvoiceExExample example);
    
    /**
     * 获取用户的总的冻结资金
     * @param userId 用户名
     * @return
     */
    @Select({
    	"select sum(FreezeAmount) as sumFreezeAmount from Ymt_FundAccountFreeze  where userid=#{userId} and FreezeStatus=0"
    })
    List<Map> getSumFreezebyUserId(Integer userId);
    
    /**
     * 查询单据审核记录表
     * @param example
     * @return
     */
    @SelectProvider(type=Ymt_InvoiceApprovmentSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="InvoiceId", property="invoiceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserLoginId", property="userLoginId", jdbcType=JdbcType.NVARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="ApprovalLevel", property="approvalLevel", jdbcType=JdbcType.INTEGER),
        @Result(column="ApprovalStatus", property="approvalStatus", jdbcType=JdbcType.BIT),
        @Result(column="ApprovalResult", property="approvalResult", jdbcType=JdbcType.NVARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_InvoiceApprovment> selectYmtInvoiceApprovment(Ymt_InvoiceApprovmentExample example);
    
    
    
    @SelectProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="CounterName", property="counterName", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="TargetId", property="targetId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="Times", property="times", jdbcType=JdbcType.INTEGER),
        @Result(column="CycleTime", property="cycleTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="LastUpdateTime", property="lastUpdateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_WithDrawCounter> selectYmtWithDrawCounter(Ymt_WithDrawCounterExample example);
    
    
    @DeleteProvider(type=Ymt_WithDrawInvoiceSqlProvider.class, method="deleteByExample")
    int deleteByExample(Ymt_WithDrawInvoiceExample example);
    
    
    @UpdateProvider(type=Ymt_WithDrawCounterSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(Map<String, Object> parameter);
    
    /**
     * 买家/买手提现记录查询
     * @param userId 用户名
     * @return
     */
    @Select({
    	"select * from Ymt_WithDrawInvoice where UserId=#{userId} and  (InvoiceStatus<>-1 or ApproveStatus<>0) and WithDrawChannel<>10 and AccountType<>5 "
    })
    List<Ymt_WithDrawInvoice>  getWithDrawInvoiceByUserId(Integer userId);
    
    /**
     * 推手提现记录查询
     * @param userId 用户名
     * @return
     */
    @Select({
    	"select * from Ymt_WithDrawInvoice where UserId=#{userId} and  (InvoiceStatus<>-1 or ApproveStatus<>0) and WithDrawChannel=10 "
    })
    List<Ymt_WithDrawInvoice>  getWithDrawInvoiceByHunter(Integer userId);
    
    
    
    /**
     * 买家/买手提现记录查询
     * @param userId 用户名
     * @return
     */
    @Select({
    	"select * from Ymt_WithDrawInvoice where UserId=#{userId} and  (InvoiceStatus=0  or InvoiceStatus=1) "
    })
    List<Ymt_WithDrawInvoice>  getTotalWithDrawInvoiceByUserId(Integer userId);
    
    
    
    /**
     * 提现记录总金额-买家/买手提现记录查询
     * @param userId 用户名
     * @return
     */
    @Select({
    	"select sum(WithDrawAmount) as totalAmount from Ymt_WithDrawInvoice where UserId=#{userId} and  (InvoiceStatus<>-1 or ApproveStatus<>0) "
    })
    Long  getTotalAmountWithDrawInvoiceByUserId(Integer userId);
    
    
    
    /**
     * 推手提现记录查询
     * @param userId 用户名
     * @return
     */
    @Select({
    	"select  AccountType,sum(WithDrawAmount) as totalAmount from Ymt_WithDrawInvoice where UserId=1234  and  InvoiceStatus=3 and  WithDrawChannel=10 group by AccountType "
    })
    List<HashMap<String,Object>>  getTotalAmountWithDrawInvoiceByHunter(Integer userId);
}
